package com.teemor.blog.api;

import com.teemor.blog.model.ArticleIPo;
import com.teemor.blog.model.ArticleOPo;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author zhoulk
 * @Description:
 * @date: 2019/7/23
 */
@RequestMapping(value = "/article")
public interface ArticleApi {

    @PostMapping(value = "/article")
    void addArticle(@RequestBody ArticleIPo inParam);

    @PutMapping(value = "/article")
    void updArticle(@RequestBody ArticleIPo inParam);

    @DeleteMapping(value = "/article/{atcId}")
    void delArticle(@PathVariable Integer atcId);

    @GetMapping(value = "/article/{atcId}")
    ArticleOPo qryArticle(@PathVariable Integer atcId);

    @GetMapping(value = "/articles")
    List<ArticleOPo> qryArticles(ArticleIPo inParam);
}
